package com.bite.common.core.constants;

// 存储缓存相关信息
public class CacheConstants {
    public static final String SEPARATOR = ":";

    public static final String LOGIN_USER_KEY = "loginuser:";
    public static final long EXP = 720L; // 超出时间 单位是分钟
    public static final long REFRESH_TIME = 360L; // 临界时间

    public static final String PHONE_CODE_KEY = "p:c:"; // 手机验证码key
    public static final String CODE_TIME_KEY = "c:t:"; // 当天发送验证码的次数

    /** 竞赛 **/
    public static final String EXAM_DETAIL = "e:d:"; // 竞赛详情
    public static final String EXAM_FINISHED_LIST = "e:f:l"; // 完赛的竞赛
    public static final String EXAM_UNFINISHED_LIST = "e:uf:l"; // 未完赛的竞赛
    public static final String EXAM_RANK_LIST = "e:r:l:"; // 竞赛的用户排名

    /** C端用户 **/
    public static final String USER_EXAM_LIST = "u:e:l:"; // 用户已经报名的竞赛
    public static final String USER_DETAIL = "u:d:"; // 用户详情
    public static final String USER_UPLOAD_TIMES_KEY = "u:u:t:k"; // 用户文件上传次数
    public static final long USER_EXP = 10L;
    public static final String USER_SUBMIT_LIST = "u:su:l:"; // 用户执行结果 后面需要添加 userId:questionId:examId(如果有)
    public static final long USER_SUBMIT_EXP = 30L; // 设置结果保存30分钟

    /** 问题 **/
    public static final String QUESTION_LIST = "q:l";
    public static final String EXAM_QUESTION_LIST = "e:q:l:";
    public static final String QUESTION_HOT_LIST = "q:h:l";
    public static final String QUESTION_HOT_DETAIL = "q:h:d:";


    /** 消息 **/
    public static final String USER_MESSAGE_LIST = "u:m:l:";
    public static final String MESSAGE_DETAIL = "m:d:";
}
